/* MERARY product-card hover — one behaviour for «Хиты продаж» and the whole catalog.
   Lift 5px · photo zoom 3.5% inside the frame · same easing/duration everywhere.
   Scoped with :is() so a single rule set serves both pages (no duplicated, conflicting copies).

   The zoom uses the independent `scale` property, never `transform`: cards with an admin photo layout
   carry an inline `transform: translate() scale()` on the <img>; `scale` composes with it, so the editorial
   crop is kept and nothing jumps. */

html body.catalog-exact{
  --ch-border:rgb(234,223,221);
  --ch-shadow:0 8px 25px rgba(73,46,50,.043);
}
html body #bestsellers{
  --ch-border:rgba(232,210,214,.95);
  --ch-shadow:0 10px 26px rgba(90,56,64,.06);
}
:root{--ch-ease:cubic-bezier(.22,1,.36,1)}

@media (hover:hover) and (pointer:fine){
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card{
    transition:transform .5s var(--ch-ease),box-shadow .5s var(--ch-ease),border-color .35s;
  }
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover{
    transform:translateY(-5px);border-color:rgba(232,165,176,.95);
    box-shadow:0 26px 46px -22px rgba(212,80,122,.42),0 8px 18px rgba(90,56,64,.06);
  }
  html :is(body.catalog-exact, body #bestsellers) .cx-product-image{overflow:hidden}
  html :is(body.catalog-exact, body #bestsellers) .cx-product-image img{scale:1;transition:scale .9s var(--ch-ease)}
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover .cx-product-image img{scale:1.035}
  html :is(body.catalog-exact, body #bestsellers) .cx-wish{transition:transform .3s var(--ch-ease),background-color .25s}
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover .cx-wish{transform:scale(1.06)}
  html :is(body.catalog-exact, body #bestsellers) .cx-wish:hover{transform:scale(1.16)}
}

/* reduced motion: hover keeps colour/shadow feedback, loses all movement */
@media (prefers-reduced-motion:reduce){
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card,
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover,
  html :is(body.catalog-exact, body #bestsellers) .cx-product-image img,
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover .cx-product-image img,
  html :is(body.catalog-exact, body #bestsellers) .cx-wish,
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover .cx-wish,
  html :is(body.catalog-exact, body #bestsellers) .cx-wish:hover{transform:none !important;scale:none !important;transition:none !important}
}

/* touch screens: a tap must not leave a "stuck hover" lift / shadow / zoom on the card */
@media (hover:none),(pointer:coarse){
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover{
    transform:none;border-color:var(--ch-border);box-shadow:var(--ch-shadow);
  }
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover .cx-product-image img{scale:1}
  html :is(body.catalog-exact, body #bestsellers) .cx-product-card:hover .cx-wish{transform:none}
}
